<template>
     <div class="title2">
        {{ data.salesToday }}
      </div>
      <div class="container">
        <div class="item-top">
          日同比&nbsp;&nbsp;{{ data.salesGrowLastDay }}%&nbsp;&nbsp;<el-icon color="green"><CaretTop /></el-icon>
        </div>
        <div class="item-bottom">
          月同比&nbsp;&nbsp;{{data.saleSGrowLastMonth}}%&nbsp;&nbsp;<el-icon color="green"><CaretTop /></el-icon>
        </div>
      </div>
      <div class="footer">
        昨日销售额&nbsp;&nbsp;¥{{ data.salesLastDay }}
      </div>
</template>

<script setup>
// import {  onMounted } from 'vue'
import { CaretTop } from '@element-plus/icons-vue'
import { useDataStore } from '@/stores/dataStore'
import { storeToRefs } from 'pinia'

const store = useDataStore()
const { data } = storeToRefs(store)
// onMounted(() => {
//   store.getTopData()
// })

</script>

<style scoped>
.container {
  height: 80px;
  border-bottom: 1px solid #eee;
  margin-bottom: 10px;
  margin-top: 10px;
}
.title2{
  font-size: 25px;
    font-weight: 600;
    margin-top: 10px;
}
.footer {
  font-size: 14px;
}
</style>